<%-- 
    Document   : AddConsultant
    Created on : Feb 27, 2014, 11:03:27 AM
    Author     : Mukesh
--%>

<%
    try {
        if (session.getAttribute("uid") != null) {
            if (session.getAttribute("Consultant").toString().equals("1")) {
%>
<%@page import="State.StateBean"%>
<%@page import="Country.CountryBean"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Vector"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <title>Ramgovind Automated System</title>

        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap-responsive.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/style.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap.datepicker.css">
        <script src="../../ajax/ajax.js"></script>

    </head>
    <body>
        <%@include file="/topheader.html" %>
        <%@include file="/servicesheader.html" %>
        <div class="main">
            <div class="container-fluid">
                <%@include file="/Services/HR/hrsidenav.jsp" %>
                <div class="content">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="box">
                                <div class="box-head">
                                    <h3>Add Consultant</h3>
                                    <a href="Consultant.jsp">
                                        <button style="float: right" class="btn btn-success">View Consultant</button>
                                    </a>
                                </div>
                                <form action="/RIT/EditConsultant" method="post" class='validate form-horizontal'>
                                    <div class="box-content">
                                        <!---Form Start....-->

                                        <div id="lside" style="float: left; margin-top: 10px;">
                                            <div class="control-group">
                                                <label for="cname" class="control-label">Consultant Name<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="cname" id="cname" value="<%=request.getParameter("cname")%>" class="required">
                                                    <input type="hidden" name="id" id="id" value="<%=request.getParameter("id")%>">
                                                    <input type="hidden" name="addressid" id="id" value="<%=request.getParameter("addressid")%>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="email" class="control-label">Email ID<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="email" id="email" value="<%=request.getParameter("email")%>" class="required email">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="mobile" class="control-label">Mobile No.<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="mobile" id="mobile" value="<%=request.getParameter("mobile")%>" class="required number">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="add1" class="control-label">Address1.<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="add1" id="add1" value="<%=request.getParameter("add1")%>" class="required">
                                                </div>
                                            </div>
                                        </div>
                                        <div id="rside" style="float: right; margin-right: 120px; margin-top: 10px">
                                            <div class="control-group">
                                                <label for="add2" class="control-label">Address2</label>
                                                <div class="controls">
                                                    <input type="text" name="add2" id="add2" value="<%=request.getParameter("add2")%>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="pinCode" class="control-label">Pin Code<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="pinCode" id="pinCode" value="<%=request.getParameter("pin")%>" class="required number">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="county" class="control-label">Country<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <select name="country" id="country" class='{required:true}' onchange="getState(this.value, 'state')" >
                                                        <option selected value="<%=request.getParameter("counid")%>"><%=request.getParameter("counname")%></option>
                                                        <%
                                                            Vector<Object> list1 = Country.Query.viewAll();
                                                            Iterator it1 = list1.iterator();
                                                            while (it1.hasNext()) {
                                                                CountryBean cb = (CountryBean) it1.next();

                                                        %>
                                                        <option value="<%=cb.getCountryId()%>"><%=cb.getCountryName()%></option>
                                                        <%}%>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="state" class="control-label">State<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <select name="state" id="state" class='required'>
                                                        <option value="<%=request.getParameter("stateid")%>"><%=request.getParameter("state")%></option>
                                                    </select>
                                                </div>
                                            </div>

                                        </div>
                                        <!---Form Ends....-->
                                    </div>
                                    <div class="form-actions">
                                        <input type="submit" class='btn btn-primary'>

                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>	
            </div>
        </div>
        <script src="/RIT/js/jquery.js"></script>
        <script src="/RIT/js/less.js"></script>
        <script src="/RIT/js/bootstrap.min.js"></script>
        <script src="/RIT/js/jquery.uniform.min.js"></script>
        <script src="/RIT/js/bootstrap.timepicker.js"></script>
        <script src="/RIT/js/bootstrap.datepicker.js"></script>
        <script src="/RIT/js/chosen.jquery.min.js"></script>
        <script src="/RIT/js/jquery.fancybox.js"></script>
        <script src="/RIT/js/plupload/plupload.full.js"></script>
        <script src="/RIT/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
        <script src="/RIT/js/jquery.cleditor.min.js"></script>
        <script src="/RIT/js/jquery.inputmask.min.js"></script>
        <script src="/RIT/js/jquery.tagsinput.min.js"></script>
        <script src="/RIT/js/jquery.mousewheel.js"></script>
        <script src="/RIT/js/jquery.textareaCounter.plugin.js"></script>
        <script src="/RIT/js/ui.spinner.js"></script>
        <script src="/RIT/js/jquery.jgrowl_minimized.js"></script>
        <script src="/RIT/js/jquery.form.js"></script>
        <script src="/RIT/js/jquery.validate.min.js"></script>
        <script src="/RIT/js/bbq.js"></script>
        <script src="/RIT/js/jquery-ui-1.8.22.custom.min.js"></script>
        <script src="/RIT/js/jquery.form.wizard-min.js"></script>
        <script src="/RIT/js/jquery.cookie.js"></script>
        <script src="/RIT/js/jquery.metadata.js"></script>
        <script src="/RIT/js/custom.js"></script><script src="/RIT/js/demo.js"></script>
        <script src="/RIT/js/iconfont.js"></script>
        
    </body>
</html>

<%} else {
%>
<script type="text/javascript">
    alert("You Are Not Authorised");
    window.history.back();
</script>
<%             }
        } else {
            request.setAttribute("msg", "You Are Not Authorised! Please Contact to System Administrator!");
            request.setAttribute("value", "0");
            getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        }
    } catch (Exception e) {
        request.setAttribute("msg", "Please Contact to System Administrator!");
        request.setAttribute("value", "0");
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
    }
%>

